import time

def get_check(num):
    def check(func):
        def inner(*args, **kwargs):
            begin = time.time()
            set = func(*args, **kwargs)
            end = time.time()
            if num == 0:
                print("函数 运行时间为%s" % int(end - begin))
            else:
                print("函数 运行时间为%s" % (end - begin))
            return set
        return inner
    return check

@get_check(5)
def func1(name,m):
    print(f"{name} 开始运行....")
    for i in range(m):
        time.sleep(1)
        print(f"运行{i}中....")
    print(f"{name} 运行结束..." )

func1("牛顿",5)